/* util */
import { getRootWindowInitData } from '@src/util/window'
/* vue */
import { computed, ComputedRef } from 'vue'

const rootWindowInitData = getRootWindowInitData()

export function useEdition() {
  
  // 是否为已付费的版本
  const isPayed: ComputedRef<boolean> = computed(() => {
    return rootWindowInitData?.isPay == 1
  })
  
  // 是否为未付费的版本
  const isNotPayed: ComputedRef<boolean> = computed(() => !isPayed.value)
  
  return {
    isPayed,
    isNotPayed
  }
}